package com.rui.cn.feignservice;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.rui.cn.consumer.common.FeignClientConfig;
import com.rui.cn.feignservice.fallback.FallbackFactorySysLog;
import com.rui.cn.entity.system.SysLog;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhang123
 * @since 2018-01-20
 */
@FeignClient(value="CLOUD-ZUUL-GATEWAY",configuration=FeignClientConfig.class,fallbackFactory = FallbackFactorySysLog.class)
public interface SysLogService{

    @PostMapping(value = "/cloud/permission-proxy/syslog/insertLog")
    void insertLog(@RequestBody SysLog loggerEntity);

    @PostMapping(value = "/cloud/permission-proxy/syslog/logList")
    List<SysLog> logList(@RequestBody Pagination pagination);
}
